<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="${pageContext.request.contextPath}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<%@ include file="base.jsp" %>
<script src="${pageContext.request.contextPath}/js/jquery.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/base.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerGrid.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerForm.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerDateEditor.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerComboBox.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerCheckBox.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerRadio.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerSpinner.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerTextBox.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/inject.js" type="text/javascript"></script> 
<script src="${pageContext.request.contextPath}/js/ligerPopupEdit.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerDialog.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerTip.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.metadata.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/messages_cn.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ligerButton.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/common/ligerUiCommon.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/common/dateFormateUtil.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/common/ajax.js" type="text/javascript"></script>
<script type="text/javascript">
var manager;
$(function () {
    manager = $("#btn").ligerButton(
    {
        click: function ()
        {
        	var set = {
        			oldPassword:$("#oldPassword").val(),
        			newPassword:$("#newPassword").val()
        		};
        	
        	if(!$("#oldPassword").val() || !$("#newPassword").val()) {
        		$("#error").html("*密码不能为空*");
        		return;
        	}
        	
        	if($("#reNewPassword").val() != $("#newPassword").val()) {
        		$("#error").html("*两次密码输入不一致*");
        		return;
        	}
        	
        	
        	var url = "${pageContext.request.contextPath}/XtszAction?control=changPassword";
        	sendAjaxRequest(url, JSON.stringify(set), false, function(msg) {
        		if("success" == msg.data) {
        			location = "${pageContext.request.contextPath}/success.html";
        		} else {
        			$("#error").html(msg.data);
        		}
        	});
        }
    });
});



</script>
<style type="text/css">
body{background:#ffffff}
html{_overflow-y:scroll;}

.contentDiv {
	margin-top: 10%;
}
.contentDiv div {
	width: 300px;
	margin-right: auto;
	margin-left: auto;
	margin-top: 10PX
}

.contentDiv div input {
	margin-left: 40px;
	width: 160px;
	height: 18px;
}

.contentDiv div label {
	font-size:15px; 
}
#btn {
}

</style>
<title>用户设置</title>
</head>
<body>
	<div class="contentDiv">
		<div><span style="color: red;margin-left: 120px ; font-size: 12px" id="error"></span></div>
		<div><label for="oldPassword">输入旧密码:</label><input type="password" id = "oldPassword"> </div>
		<div><label for="newPassword">输入新密码:</label><input type="password" id = "newPassword"> </div>
		<div><label for="reNewPassword">确认新密码:</label><input type="password" id = "reNewPassword"> </div>
		<div>
          <div id="btn" style="margin-top: 20px">确定</div>
       </div>

	</div>
</body>
</html>